﻿<?php
 
    define('ACC',true);
require_once('../include/init.php');

    $cat = new catModel();
//    $data = $cat->getall();
    
    $cat_id = $_GET['cat_id'];
    
    //判断，要删除的目录下是否有子目录
    if(!empty($cat->getlist($cat_id))){
        echo '该菜单下 有子菜单不能删除！';
        exit();
    }

    if($cat->del($cat_id)){
           echo '删除成功';
    }

?>